#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int main()
{
	char arr1[1005] = "";
	char arr2[1005] = "";
	scanf("%s", arr1);
	scanf("%s", arr2);
	size_t len = strlen(arr1);
	int count = 0;
	for (int i = 0; i < len; i++)
	{
		if (arr1[i] != arr2[i])
		{
			arr1[i] = (arr1[i] == 'o' ? '*' : 'o');
			arr1[i+1] = (arr1[i+1] == 'o' ? '*' : 'o');
			count++;
		}
	}
	printf("%d\n", count);
	return 0;
}